home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / dowhenidle.z / dowhenidle
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333TTTTkkkk))))                                          TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_DoWhenIdle, Tk_CancelIdleCall - invoke a procedure when there are no
  10.      pending events
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  14.  
  15.      TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee(_p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
  16.  
  17.      TTTTkkkk____CCCCaaaannnncccceeeellllIIIIddddlllleeeeCCCCaaaallllllll(_p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
  18.  
  19. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  20.      Tk_IdleProc   *_p_r_o_c        (in)      Procedure to invoke.
  21.  
  22.      ClientData    _c_l_i_e_n_t_D_a_t_a   (in)      Arbitrary one-word value to pass to
  23.                                           _p_r_o_c.
  24.  
  25.  
  26. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  27.      TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee arranges for _p_r_o_c to be invoked when the application
  28.      becomes idle.  The application is considered to be idle when
  29.      TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt has been called, it couldn't find any events to handle, and
  30.      it is about to go to sleep waiting for an event to occur.  At this point
  31.      all pending TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee handlers are invoked.  For each call to
  32.      TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee there will be a single call to _p_r_o_c;  after _p_r_o_c is invoked
  33.      the handler is automatically removed.  TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee is only useable in
  34.      programs that use TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt to dispatch events.
  35.  
  36.      _P_r_o_c should have arguments and result that match the type TTTTkkkk____IIIIddddlllleeeePPPPrrrroooocccc:
  37.           typedef void Tk_IdleProc(ClientData _c_l_i_e_n_t_D_a_t_a);
  38.      The _c_l_i_e_n_t_D_a_t_a parameter to _p_r_o_c is a copy of the _c_l_i_e_n_t_D_a_t_a argument
  39.      given to TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee.  Typically, _c_l_i_e_n_t_D_a_t_a points to a data structure
  40.      containing application-specific information about what _p_r_o_c should do.
  41.  
  42.      TTTTkkkk____CCCCaaaannnncccceeeellllIIIIddddlllleeeeCCCCaaaallllllll may be used to cancel one or more previous calls to
  43.      TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee:  if there is a TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee handler registered for _p_r_o_c
  44.      and _c_l_i_e_n_t_D_a_t_a, then it is removed without invoking it.  If there is more
  45.      than one handler on the idle list that refers to _p_r_o_c and _c_l_i_e_n_t_D_a_t_a, all
  46.      of the handlers are removed.  If no existing handlers match _p_r_o_c and
  47.      _c_l_i_e_n_t_D_a_t_a then nothing happens.
  48.  
  49.      TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee is most useful in situations where (a) a piece of work will
  50.      have to be done but (b) it's possible that something will happen in the
  51.      near future that will change what has to be done, or require something
  52.      different to be done.  TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee allows the actual work to be
  53.      deferred until all pending events have been processed.  At this point the
  54.      exact work to be done will presumably be known and it can be done exactly
  55.      once.
  56.  
  57.      For example, TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee might be used by an editor to defer display
  58.      updates until all pending commands have been processed.  Without this
  59.      feature, redundant redisplays might occur in some situations, such as the
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333TTTTkkkk))))                                          TTTTkkkk____DDDDooooWWWWhhhheeeennnnIIIIddddlllleeee((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      processing of a command file.
  75.  
  76.  
  77. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  78.      callback, defer, handler, idle
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.